﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Singer.Middleware.AutoMapper
{
    public class CoreMapper : Mapper, ICoreMapper
    {
        public CoreMapper(IConfigurationProvider configuration) : base(configuration)
        {
        }

        public IEnumerable<TDestination> MapList<TSource, TDestination>(IEnumerable<TSource> source)
        {
            foreach (var item in source)
            {
                yield return Map<TSource, TDestination>(item);
            }
        }
    }
}
